Previous Thread
Next Thread
Print Thread
Rate Thread


~;

$alt_color2 = "$vars_style{AltColumnColor2}";

foreach $row(@sort_topic) {
if ($alt_color2 eq "$vars_style{AltColumnColor1}") {
$alt_color2 = "$vars_style{AltColumnColor2}";
} else {
$alt_color2 = "$vars_style{AltColumnColor1}";
}

if ($row !~ /^A/) {
@posted = split(/||/, $row);

if (($posted[8] eq 'unreg') or ($posted[8] eq '')){
$listed_name = $posted[2];
} else {

if ($posted[11] eq '') {

# old post- we need to find user number
$this_user_number = &GetUserNumber($posted[2]);
if ((-e "$vars_config{MembersPath}/$this_user_number.cgi") && ($this_user_number ne '')) {
@user_profile = &OpenProfile("$this_user_number");
} else {
$user_profile[15] = $posted[2];
}

} else {

# already have user number
if (-e "$vars_config{MembersPath}/$posted[11].cgi") {
@user_profile = &OpenProfile("$posted[11]");
} else {
$user_profile[15] = "$posted[10]"; chomp($posted[10]);
}

}

chomp($user_profile[15]);
if ($user_profile[15] ne '') {
$listed_name = $user_profile[15];
} else {
$listed_name = $posted[2];
}
chomp($listed_name);

}
$summary .= qq~



~;
}

}
$summary .= "$TBB

";
}
return($summary);

}
#147241 09/09/2001 6:21 AM
Joined: Sep 2001
Posts: 8
Junior Member
Junior Member
Offline
Joined: Sep 2001
Posts: 8
This is Sleepy's Hack "ViewPMreply"

#############################
# Sleepy custom hack
#
# To view PM when replying
#
# ###########################
#
# Only 2 files need changing
#
# public_pm_form.pl & ubb_pm.cgi
#
############################
###################
#OPEN public_pm_form.pl
###################
#find
###################

print<$TBB














NearBottom

#################
# replace with
#################

print<$TBB















$i_frame




NearBottom

#################
# save and exit
#################
# open ubb_pm.cgi
#################
# find
#################

sub pm_reply {
local(%pm_user_index, %pm_topic_data, %pm_date, %pm_time, %pm_post, %pm_icon, %pm_to, %pm_from, %pm_signature, @pm_profile, $ubb_images, $j, $is_html, $is_ubb, $html_allowed, $ubb_allowed, $ubb_images_wording, $icon_field, $show_sig, $disable_smilies, $close_option, @user_profile, $ubb_code_buttons, $pm_to_name, $page_title, $form_hiddens, $breadcrumb, $subject_field);

################
# replace
################

sub pm_reply {
local(%pm_user_index, %pm_topic_data, %pm_date, %pm_time, %pm_post, %pm_icon, %pm_to, %pm_from, %pm_signature, @pm_profile, $ubb_images, $j, $is_html, $is_ubb, $html_allowed, $ubb_allowed, $ubb_images_wording, $icon_field, $show_sig, $disable_smilies, $close_option, $i_frame, $i_frame_alt, @user_profile, $ubb_code_buttons, $pm_to_name, $page_title, $form_hiddens, $breadcrumb, $subject_field);

###############
# find
###############

# get pm topic!
if (-e "$vars_config{MembersPath}/pm_topics/$in{d}/$in{t}.cgi") {
require "$vars_config{MembersPath}/pm_topics/$in{d}/$in{t}.cgi";
} else {
&StandardHTML("$vars_wordlets_err{no_such_pm}");
}

###############
#Below that ADD
###############

# set topic viewer:
$go_to = "$vars_config{CGIURL}/ultimatebb.cgi?ubb=get_pm&d=$in{d}&t=$in{t}";


$i_frame_alt = &build_topic_review;

if ($vars_display{InlineFrame} eq 'TRUE') {
$i_frame = qq( );
} else {
$i_frame = $i_frame_alt;
}

##################
## Save and done
##################

__________________________________________________________

But there is a Problem: When you select the radio "NO" in CP >"General Display Settings">Inline Frame View of Topic on Reply Page? the Hack doesn't work.
Because in ubb_lib_posting.cgi "sub build_topic_review" is only for ubb_new_reply.cgi: So can someone add a sub such as "sub pm_review" for ubb_pm.cgi in ubb_lib_posting.cgi? Thank you Very much!


######################################################
sub build_topic_review {
local(@sort_topic, $total_posts, $summary, $row, $alt_color2, @posted, @user_profile, $listed_name, $this_user_number);
@sort_topic = sort(@this_topic);
$total_posts = @sort_topic;

if (($total_posts > 26) || ($post_permiss eq "private")) {
$summary = qq( $vars_wordlets{topic_review_link} );
} else {
$summary = qq~
$TBT


$vars_wordlets{topic_review}


$listed_name
$posted[6]
Sponsored Links
#147242 09/09/2001 2:15 PM
Joined: May 2001
Posts: 1,042
Likes: 7
Moderator
Moderator
Offline
Joined: May 2001
Posts: 1,042
Likes: 7
Very cool! I'll install this asap!

#147243 09/10/2001 4:33 AM
Joined: May 2001
Posts: 6,708
Member
Member
Offline
Joined: May 2001
Posts: 6,708
Good hack. It would be good if you could document it.

#147244 01/02/2002 4:18 PM
Joined: Jun 2001
Posts: 216
Member
Member
Offline
Joined: Jun 2001
Posts: 216
This didn't work for 6.1.0.3. So, i Edited it as follows:

#############################
# Sleepy custom hack
#
# To view PM when replying
#
# ###########################
#
# Only 2 files need changing
#
# public_pm_form.pl & ubb_pm.cgi
#
############################
###################
#OPEN public_pm_form.pl
###################
#find
###################

print <$TBB














NearBottom

#################
# replace with
#################

print <$TBB















$i_frame




NearBottom

#################
# save and exit
#################
# open ubb_pm.cgi
#################
# find
#################

sub pm_reply {
local (%pm_user_index, %pm_user_index_sent, %pm_topic_data, %pm_date, %pm_time, %pm_post, %pm_icon, %pm_to, %pm_from, %pm_signature, @pm_profile, $ubb_images, $j, $is_html, $is_ubb, $html_allowed, $ubb_allowed, $ubb_images_wording, $icon_field, $show_sig, $disable_smilies, $close_option, @user_profile, $ubb_code_buttons, $pm_to_name, $page_title, $form_hiddens, $breadcrumb, $subject_field);

################
# replace
################

sub pm_reply {
local (%pm_user_index, %pm_user_index_sent, %pm_topic_data, %pm_date, %pm_time, %pm_post, %pm_icon, %pm_to, %pm_from, %pm_signature, @pm_profile, $ubb_images, $j, $is_html, $is_ubb, $html_allowed, $ubb_allowed, $ubb_images_wording, $icon_field, $show_sig, $disable_smilies, $close_option, $i_frame, $i_frame_alt, @user_profile, $ubb_code_buttons, $pm_to_name, $page_title, $form_hiddens, $breadcrumb, $subject_field);

###############
# find (do this twice)
###############

# get pm topic!
if (-e "$vars_config{MembersPath}/pm_topics/$in{d}/$in{t}.cgi") {
require "$vars_config{MembersPath}/pm_topics/$in{d}/$in{t}.cgi";
} else {
&StandardHTML("$vars_wordlets_err{no_such_pm}");
}

###############
#Below that ADD
###############

# set topic viewer:
$go_to = "$vars_config{CGIURL}/ultimatebb.cgi?ubb=get_pm&d=$in{d}&t=$in{t}";


$i_frame_alt = &build_topic_review;

if ($vars_display{InlineFrame} eq 'TRUE') {
$i_frame = qq( );
} else {
$i_frame = $i_frame_alt;
}

##################
## Save and done
##################

__________________________________________________________

But there is a Problem: When you select the radio "NO" in CP >"General Display Settings">Inline Frame View of Topic on Reply Page? the Hack doesn't work.
Because in ubb_lib_posting.cgi "sub build_topic_review" is only for ubb_new_reply.cgi: So can someone add a sub such as "sub pm_review" for ubb_pm.cgi in ubb_lib_posting.cgi? Thank you Very much!


######################################################

See original hack at top of forum for further information, i didn't need to continue past this point.

#147245 01/02/2002 7:39 PM
Joined: Dec 2001
Posts: 90
Member
Member
Offline
Joined: Dec 2001
Posts: 90
Cool! Now (not to downplay your work) someone just needs to make it so you can do things such as quote the PM you're replying to...just a thought

No problems installing here! Thx!


can't find peace of mind but every corner's got a mcdonalds?!
Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,080
Joined: March 2000
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 346
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 23
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)